@use "../../assets/scss/mixins/base" as mx;

$main: peru;
$bg: darken(invert($main), 20%);

$mainDark: darken($main, 10%);
$mainLight: lighten($main, 10%);
$gray: rgba(102, 102, 102, 1);
$grayLight: lighten($gray, 10%);
$brown: rgba(64, 21, 2, 1);

$widthBase: 440px;
$heightBase: 280px;
$screw: 20px;

html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  background-color: $bg;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
}

a {
  text-decoration: none;
}

h1 {
  font-size: 40px;
  text-align: center;
  margin: 20px 5px;
  letter-spacing: -2px;
}

.cassette {
  position: relative;
  width: 100%;
  height: 100%;
  .base {
    position: relative;
    margin: 0 auto;
    @include mx.rect($widthBase, $heightBase, $main, 10px);
    text-align: center;
    border: 1px solid $mainDark;
    box-shadow: 0 1px 1px black;
    &::before {
      @include mx.pseudo();
      @include mx.rect(455px, 80px, $main, 10px);
      border: 1px solid $mainDark;
      bottom: 20px;
      left: -9px;
      z-index: -1;
      display: block;
      box-shadow: 0 1px 1px black;
    }

    .screw {
      position: absolute;
      @include mx.rect($screw, $screw, $mainLight, 50%);
      z-index: 100;
      border: 1px solid $mainDark;
      display: block;
      color: $mainDark;
      transform: rotate(-50deg);
      box-shadow: 0 -1px 1px black;
      text-shadow: 0 1px 1px $main;
      &-1 {
        left: 5px;
        top: 5px;
      }
      &-2 {
        right: 5px;
        top: 5px;
      }
      &-3 {
        left: 5px;
        bottom: 5px;
      }
      &-4 {
        right: 5px;
        bottom: 5px;
      }
      &-5 {
        right: 50%;
        bottom: 15%;
        transform: translateX(50%) rotate(-50deg);
      }
    }
    .tag {
      @include mx.rect($widthBase - ($screw * 3), $screw * 9, white, 10px);
      opacity: 0.85;
      box-shadow: 0 -1px 1px black;
      text-shadow: 0 -1px 1px $gray;
      border: 1px solid $mainDark;
      margin: 0 auto;
      margin-top: $screw;
      strong {
        display: inline-block;
        font-size: 20px;
        margin: $screw;
      }
      .spool {
        position: relative;
        @include mx.rect(60%, $screw * 2.5, white, 40px);
        box-shadow: 0 1px 1px gray;
        padding: calc($screw / 2);
        margin: 0 auto;
        vertical-align: baseline;
        @include mx.pseudo-ba {
          display: block;
          @include mx.rect($screw * 2.5, $screw * 2.5, $bg, 50%);
          border: 3px dashed white;
          top: 0;
          box-shadow: 0 -1px 2px black;
        }
        &::before {
          right: 10px;
        }
        &::after {
          left: 10px;
        }

        span {
          $brown5: #ff690a;
          $brown2: #802a04;
          display: inline-block;
          position: relative;
          overflow: hidden;
          @include mx.rect($screw * 3, $screw, $bg);
          color: rgba(255, 255, 255, 0.8);
          border: 1px inset $gray;
          text-shadow: 0 1px 1px black;
          padding: 10px 20px;
          @include mx.pseudo-ba {
            color: blue;
            @include mx.rect($screw * 3, $screw * 3, null, 50%);
            top: -10px;
            background: linear-gradient(
                45deg,
                transparent,
                rgba(0, 0, 0, 0.75),
                transparent
              ),
              radial-gradient(
                ellipse at center,
                $brown5,
                black,
                $brown2,
                $brown5,
                $brown2
              );
          }
          &::after {
            right: -35%;
          }
          &::before {
            left: -35%;
          }
        }
      }
    }
  }
  .relief {
    display: inline-block;
    width: auto;
    height: 60px;
    margin: 0 auto;
    margin-top: $screw;
    text-align: center;
    font-size: 12px;
    vertical-align: baseline;
    background-color: $mainDark;
    color: $mainLight;
    background: linear-gradient(
      90deg,
      $mainDark,
      $mainDark,
      $main,
      $main,
      $mainDark,
      $mainDark
    );
    overflow: hidden;
    border-bottom: 1px solid #000;
    opacity: 0.5;
    text-shadow: 0px -1px 1px gray;
    @include mx.pseudo-ba {
      display: inline-block;
      height: 60px;
      width: $screw;
      background: linear-gradient(
        100deg,
        $main 45%,
        rgba(0, 0, 0, 0.15) 2%,
        $mainDark 53%
      );
    }
    &::after {
      background: linear-gradient(
        -100deg,
        $main 45%,
        rgba(0, 0, 0, 0.15) 2%,
        $mainDark 53%
      );
    }
  }
}
